﻿@model LynxWiki.ViewModels.WikiTopicHistoryListingViewData

@using LynxWiki.ViewModels;

    <tr>
        <td class="TableCell">@Model.CreatedOn</td>
        <td class="TableCell">@Model.Version</td>
        <td class="TableCell">@Model.Creator</td>
        <td class="TableCell">
        @using (Html.BeginForm("TopicHistory", "WikiTopic", FormMethod.Post, new { @class = "frmTopicHistory", id = Model.TopicName + Model.Version })) {
            @Html.Hidden("TopicName",Model.TopicName)
            @Html.Hidden("Version", Model.Version)
            @Html.Hidden("WikiDir", Model.WikiDir)
            @Html.Hidden("TopicBody", Model.TopicBody)
            <input type="submit" name="btnPreview" class="btnPreview" value="Preview" />
        }</td>
        <td class="TableCell">
        @using (Html.BeginForm("TopicHistory", "WikiTopic", FormMethod.Post, new { @class = "frmMakeCurrent", id = Model.TopicName + Model.Version })) {
            @Html.Hidden("TopicName",Model.TopicName)
            @Html.Hidden("Version", Model.Version)
            @Html.Hidden("WikiDir", Model.WikiDir)
            <input type="submit" name="btnMakeCurrent" class="btnMakeCurrent" value="Make Current" />
        }</td>
        <td class="TableCell">
        @using (Html.BeginForm("TopicHistory", "WikiTopic", FormMethod.Post, new { @class = "frmMakeCurrent", id = Model.TopicName + Model.Version })) {
            @Html.Hidden("TopicName",Model.TopicName)
            @Html.Hidden("Version", Model.Version)
            @Html.Hidden("WikiDir", Model.WikiDir)
            @Html.DropDownListFor(m => m.Version, new SelectList((WikiTopicHistoryListingViewData)Model, "Version", "Version" + " - " + "CreatedOn"))
            <input type="submit" name="btnShowDiff" class="btnShowDiff" value="Show Difference" />
        }</td>
    </tr>